<template>
    <el-dialog v-model="visible" @close="closePage" :title="title" fullscreen>
        <v-form-designer ref="vfdRef"></v-form-designer>
    </el-dialog>
</template>
<script setup>
import { ref } from 'vue'

const title = ref()
const isAdd = ref(true)
const visible = ref(false)
const open = (row) => {
    if (row) {
        title.value = '修改表单'
        isAdd.value = false
    } else {
        title.value = '添加表单'
        isAdd.value = true
    }
    visible.value = true;
}

defineExpose({
    open,
})

// 关闭dialog
const closePage = () => {
    visible.value = false;
}
</script>
<style>
.epic-designer-main{
    max-height: calc(100vh - 100px)
}
</style>